import Vue from 'vue'
import App from './App.vue'

// 引入 router
import router from '@/router'

// 引入 element-UI
import ElementUI from 'element-ui'
// 引入 element-UI 的样式文件
import 'element-ui/lib/theme-chalk/index.css'
// 导入字体图标
import './assets/fonts/iconfont.css'
//引入  gloable.css  全局样式文件
import '@/assets/css/gloable.css'
import TreeTable from 'vue-table-with-tree-grid'
import axios from 'axios'
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
axios.interceptors.request.use(config => {
  console.log(config);
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
Vue.prototype.$http = axios

Vue.config.productionTip = false

Vue.use(ElementUI)

Vue.component('tree-table', TreeTable)
new Vue({
  router, // 将路由挂载到根实例上
  render: h => h(App)
}).$mount('#app')
